<template>
  <div class="layerMap_arcgis">
    <div>
      <code class="code">

        <!-- script -->
        <div>
          <div class="code-tag">
            <<span>script</span>>
          </div>

          <!-- import 和 export default -->
          <div>
            <div class="code-indent2">
              <span class="code-orange">import</span>
              { Maps }
              <span class="code-orange">from</span>
              <span class="code-green">'src/base/Gykj_map'</span>
            </div>
            <div class="code-emptyLine"></div>
            <div class="code-indent2">
              <span class="code-orange">export default</span>
              {
            </div>
          </div>

          <!-- mounted -->
          <div>
            <div class="code-indent4">
              mounted () {
            </div>

            <div class="code-indent6 comment">
              // 白底地图：baseLayer
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              baseLayer =
              <span class="code-green">Maps</span>['baseLayer']()
            </div>
            <div class="code-emptyLine"></div>

            <div class="code-indent6 comment">
              // 地形图：terrainLayer
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              terrainLayer =
              <span class="code-green">Maps</span>['terrainLayer']()
            </div>
            <div class="code-emptyLine"></div>

            <div class="code-indent6 comment">
              // 卫星图：使用卫星图需要获取获取两个arcgis图层
            </div>
            <div class="code-indent6 comment">
              // 分别是 广东卫星图：GdSatelliteLayer、佛山卫星图：FsSatelliteLayer
            </div>
            <div class="code-indent6 comment">
              // 添加卫星图时，先添加 广东卫星图，后添加 佛山卫星图
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              GdSatelliteLayer =
              <span class="code-green">Maps</span>['GdSatelliteLayer']()
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              FsSatelliteLayer =
              <span class="code-green">Maps</span>['FsSatelliteLayer']()
            </div>
            <div class="code-emptyLine"></div>

            <div class="code-indent6 comment">
              // 佛山南海边框：FsNhBorderLayer
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              FsNhBorderLayer =
              <span class="code-green">Maps</span>['FsNhBorderLayer']()
            </div>
            <div class="code-emptyLine"></div>

            <div class="code-indent6 comment">
              // 佛山南海镇街名：FsNhTownLayer
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              FsNhTownLayer =
              <span class="code-green">Maps</span>['FsNhTownLayer']()
            </div>
            <div class="code-emptyLine"></div>

            <div class="code-indent6 comment">
              // 24、48小时警戒线：warnLineLayer
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              warnLineLayer =
              <span class="code-green">Maps</span>['warnLineLayer']()
            </div>
            <div class="code-emptyLine"></div>

            <div class="code-indent6 comment">
              // 水网：使用水网需要获取获取两个arcgis图层
            </div>
            <div class="code-indent6 comment">
              // 分别是 广东水网：GdWaterNetLayer、华南水网：HnWaterNetLayer
            </div>
            <div class="code-indent6 comment">
              // 添加水网时，先添加 广东水网，后添加 华南水网
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              GdWaterNetLayer =
              <span class="code-green">Maps</span>['GdWaterNetLayer']()
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              HnWaterNetLayer =
              <span class="code-green">Maps</span>['HnWaterNetLayer']()
            </div>
            <div class="code-emptyLine"></div>

            <div class="code-indent6 comment">
              // 路网：roadNetLayer
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              roadNetLayer =
              <span class="code-green">Maps</span>['roadNetLayer']()
            </div>
            <div class="code-emptyLine"></div>

            <div class="code-indent6 comment">
              // 同时，你还可以通过传入参数，来控制图层的属性，这里以路网为例子
            </div>
            <div class="code-indent6">
              <span class="code-default">const</span>
              roadNetLayer2 =
              <span class="code-green">Maps</span>['roadNetLayer']({
            </div>
            <div class="code-indent8">
              layerOptions: {
            </div>
            <div class="code-indent10">
              opacity: 0.8,
              <span class="comment">
                // 图层透明度为0.8
              </span>
            </div>
            <div class="code-indent10">
              visible: false
              <span class="comment">
                // 默认不显示
              </span>
            </div>
            <div class="code-indent8">
              }
            </div>
            <div class="code-indent6">})</div>
            <div class="code-emptyLine"></div>

            <div class="code-indent4">}</div>
          </div>

          <!-- export default 的 } -->
          <div class="code-indent2">}</div>

          <!-- /script -->
          <div class="code-tag">
            </<span>script</span>>
          </div>
        </div>

      </code>
    </div>

  </div>
</template>

<script>
export default {

}
</script>

<style lang="scss" scoped>
  .layerMap_arcgis {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: auto;
  }
</style>
